module ApplicationHelper
  #definisce nome della classe dei links nel menu principale
  def class_menu(link)
    if @controller.action_name == link
      return "selected " + link
    elsif @controller.action_name == "topten" && link == "clients"
      return link
    else
      return classe = case
        when @controller.controller_name == link: "selected " + link
        else link      
      end
    end
  end
  
  def operations_list
    list = "<ul id='operations_list'>"
    for operation in @assistance.operations do
      list << "<li>" + operation.description + "</li>"
    end
    list << "</ul>"
    return list
  end
  
end
